package com.ice.netty.modbus.data;

import org.apache.commons.lang3.ArrayUtils;


public class MiiServerBaseData implements MsgBaseData {
    protected byte[] datas;

    protected byte[] content;

    // 内容信息
    protected String contentStr;

    public MiiServerBaseData(byte[] datas) {
        this.datas = datas;
        if (datas != null && datas.length > 0) {
            this.contentStr = new String(this.datas);
        }
    }

    @Override
    public byte[] toBytes() {
        return datas;
    }

    public int length() {
        return datas.length;
    }
}
